package com.demo.pojo;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * 聊天消息
 */
@Data
public class ChatMessage {
    //id
    private Long id;
    //发起人id
    private Long fromId;
    //接收人id
    private Long toId;
    //内容
    private String content;
    //时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime time;
    //状态
    private Integer status;//0-未读 1-已读

}
